<template>
    <div id="main">
        <nav>
            <span class="fa fa-angle-left" @touchstart="back"></span>
            <span>我的发布</span>
            <span class="fa fa-ellipsis-h" @touchstart="btn"></span>
        </nav>
        <div id="hide" v-show="show">
            <span class="fa fa-caret-up"></span>
            <div id="hide-bottom">
                <router-link to="/second/Message">
                    <div class="one">
                        <span class="fa fa-commenting-o"></span>
                        <span>消息</span>
                    </div>
                </router-link>
                <router-link to="/">
                    <div class="two">
                        <span class="fa fa-home"></span>
                        <span>首页</span>
                    </div>
                </router-link>
            </div>
        </div>
        <div id="box" @touchstart="btnn">
            <div id="content">
                <span>你还没有发布任何商品</span>
                <router-link to="/second/Publish">
                    <p>发布新商品</p>
                </router-link> 
            </div>
        </div>
    </div>
</template>

<script>
export default{
    data:function(){
        return{
            show:false,
        }
    },
    methods:{
        back:function(){
            history.back();
        },
        btn:function(){
            this.show = !this.show;
        },
        btnn:function(){
            this.show = false;
        }
    },
}
</script>

<style scoped>
    #mian{
        background-color: white;
    }
    nav{
        height: 35px;
        line-height: 35px;
        border-bottom: 1px solid #aaa;
        padding: 0 10px;
        display: flex;
        justify-content: space-between;
        z-index: 100;
    }
    nav span:nth-of-type(1){
        font-size: 23px;
        margin-top: 5px;
    }
    nav span:nth-of-type(3){
        font-size: 22px;
        margin-top: 8px;
    }
    #hide{
        position: absolute;
        right: 5px;
        top: 1px;
        
    }
    .fa-caret-up{
        font-size: 25px;
        position: relative;
        top: 9px;
        left: 79px;
        color: rgba(0,0,0,0.75);
    }
    #hide-bottom{
        width: 100px;
        height: 70px;
        border: 1px solid #666;
        color: white;
        background-color: rgba(0,0,0,0.75);
    }
    .one{
        border-bottom: 1px solid #999;
    }
    .two,.one{
        height: 35px;
        line-height: 35px; 
        padding-left: 8px;
    }
    .one span:nth-of-type(2){
        margin-left: 6px;
        font-size: 14px;
    }
    .two span:nth-of-type(2){
        margin-left: 6px;
        font-size: 14px;
    }
    a{
        color: white;
        text-decoration: none;
    }
    #box{
        height: calc(100vh - 35px);
        width: 100%;
    }
    #content{
        width: 200px;
        position: absolute;
        left: 50%;
        top: 280px;
        transform: translateX(-50%);
        text-align: center;
    }
    #content span{
        font-size: 13px;
    }
    #content p{
        width: 160px;
        margin: auto;
        margin-top: 10px;
        padding: 4px 0;
        background-color: red;
        color: white;
    }
</style>